﻿@layout RootLayout
@inherits LayoutComponentBase

@if ( layoutType == "fixed-header" )
{
    <Layout Sider>
        <LayoutSider>
            <LayoutSiderContent>
                <SideMenu />
            </LayoutSiderContent>
        </LayoutSider>
        <Layout>
            <LayoutHeader Fixed>
                <TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged"
                         ThemeGradientChanged="@OnThemeGradientChanged"
                         ThemeRoundedChanged="@OnThemeRoundedChanged"
                         ThemeColorChanged="@OnThemeColorChanged"
                         @bind-LayoutType="@layoutType" />
            </LayoutHeader>
            <LayoutContent Padding="Padding.Is4.OnX">
                @Body
            </LayoutContent>
        </Layout>
    </Layout>
}
else if ( layoutType == "fixed-header-footer-only" )
{
    <Layout>
        <LayoutHeader Fixed>
            <TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged"
                     ThemeGradientChanged="@OnThemeGradientChanged"
                     ThemeRoundedChanged="@OnThemeRoundedChanged"
                     ThemeColorChanged="@OnThemeColorChanged"
                     @bind-LayoutType="@layoutType" />
        </LayoutHeader>
        <LayoutContent Padding="Padding.Is4.OnX">
            @Body
        </LayoutContent>
        <LayoutFooter Fixed>
            <FooterMenu></FooterMenu>
        </LayoutFooter>
    </Layout>
}
else if ( layoutType == "sider-with-header-on-top" )
{
    <Layout>
        <LayoutHeader Fixed>
            <TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged"
                     ThemeGradientChanged="@OnThemeGradientChanged"
                     ThemeRoundedChanged="@OnThemeRoundedChanged"
                     ThemeColorChanged="@OnThemeColorChanged"
                     @bind-LayoutType="@layoutType" />
        </LayoutHeader>
        <Layout Sider>
            <LayoutSider>
                <LayoutSiderContent>
                    <SideMenu />
                </LayoutSiderContent>
            </LayoutSider>
            <Layout>
                <LayoutContent Padding="Padding.Is4.OnX">
                    @Body
                </LayoutContent>
            </Layout>
        </Layout>
    </Layout>
}